<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right">
        <li class="active"><a href="./index.html">首页<span class="sr-only">(current)</span></a></li>
        <li><a href="./introduce.html">平台简介</a></li>
        <li><a href="./dynamic.html">动态</a></li>
        <li><a href="./aquatic.html">水产品科普</a></li>
        <li><a href="./news.html">新闻</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">水产品可视化<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="./bigdata/index.html">黑鲷鱼</a></li>
            <li><a href="#">对虾</a></li>
            <li><a href="#">牡蛎</a></li>
          </ul>
        </li>
        <li><a href="./contact.html">联系我们</a></li>
        <li><a href="./search.html">搜索</a></li>
      </ul>
      
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
<script>

$(function ()
{
     $('.navbar-nav li').find('a').each(function () {
            if (this.href == document.location.href || document.location.href.search(this.href) >= 0) {
                $(this).parent().siblings('li').removeClass('active');
                $(this).parent().addClass('active'); 
            }
        });
});
</script>